import request from '@/utils/request'

//微信小程序的一键登录
export const wmaLogin = (params: any) => {
  return request({
    url: '/app-api/member/doctor/auth/weixin-mini-app-login',
    method: 'POST',
    body: params,
    hideLoading: false,
  })
}
//校验手机验证码
export const validateSmsCode = (params: any) => {
  return request({
    url: '/app-api/member/doctor/auth/validate-sms-code',
    method: 'POST',
    body: params,
    hideLoading: false,
  })
}
//发送手机验证码
export const sendSmsCode = (params: any) => {
  return request({
    url: '/app-api/member/doctor/auth/send-sms-code',
    method: 'POST',
    body: params,
    hideLoading: false,
  })
}
//校验手机验证码
export const smsLogin = (params: any) => {
  return request({
    url: '/app-api/member/doctor/auth/sms-login',
    method: 'POST',
    body: params,
    hideLoading: false,
  })
}
//校验用户是否是新用户
export const userIsNew = (params: any) => {
  return request({
    url: `/app-api/member/user/validate/user/isNew/${params}`,
    method: 'GET',
    hideLoading: false,
  })
}
//获得基本信息
export const userGet = () => {
  return request({
    url: `/app-api/member/doctor/detail`,
    method: 'GET',
    hideLoading: false,
  })
}
//登出系统
export const authLogout = () => {
  return request({
    url: '/app-api/member/doctor/auth/logout',
    method: 'POST',
    hideLoading: false,
  })
}
//注销登录
export const authLogOff = () => {
  return request({
    url: '/app-api/member/doctor/auth/logoff',
    method: 'POST',
    hideLoading: false,
  })
}
//使用手机 + 密码登录
export const authLogin = (params: any) => {
  return request({
    url: '/app-api/member/doctor/auth/login',
    method: 'POST',
    body: params,
    hideLoading: false,
  })
}

// 重置密码
export const resetPassword = (params: any) => {
  return request({
    url: '/app-api/member/user/reset-password',
    method: 'POST',
    body: params,
    hideLoading: false,
  })
}